package com.example.missingpersons.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.io.Serial;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

/**
 * user 实体类
 * @author 张芸博
 * @since 2025-03-12
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 用户的唯一标识
     */
    @TableId(value = "user_id", type = IdType.AUTO)
    @Schema(name = "user_id", description = "用户的唯一标识")
    private Integer userId;

    /**
     * 用户名
     */
    @Schema(name = "username", description = "用户名")
    private String username;

    /**
     * 密码（加密存储）
     */
    @Schema(name = "password", description = "密码（加密存储）")
    private String password;

    /**
     * 用户角色
     */
    @Schema(name = "role_id", description = "用户角色")
    private Integer roleId;

    /**
     * 用户联系方式
     */
    @Schema(name = "contact_info", description = "用户联系方式")
    private String contactInfo;

    /**
     * 邮箱
     */
    @Schema(name = "email", description = "邮箱")
    private String email;

    /**
     * 记录创建时间
     */
    @Schema(name = "created_at", description = "记录创建时间")
    private LocalDateTime createdAt;

    /**
     * 记录更新时间
     */
    @Schema(name = "updated_at", description = "记录更新时间")
    private LocalDateTime updatedAt;


}
